#ifndef RACKET_H
#define RACKET_H

#include <QGraphicsPixmapItem>
#include<QObject>
#include <Qpixmap>
#include <QGraphicsItemGroup>
#include <QVector2D>

class Racket :public QObject , public QGraphicsItemGroup
{
    Q_OBJECT
public:
    explicit Racket(QObject *parent1 = nullptr , QGraphicsItem *parent = nullptr);//构造函数
    void SetStickPosition(const QPointF &pos); // 设置球拍把手位置
    void RotateRacket(int angle); // 旋转球拍

public:
    QGraphicsPixmapItem *m_Net; // 球网
    QGraphicsPixmapItem *m_Stick; // 球拍杆子
    QPointF m_RotationPoint; // 旋转点
};

#endif // RACKET_H
